package top.yokey.shopnc.model;

import top.yokey.base.base.BaseHttpClient;
import top.yokey.base.base.BaseHttpListener;
import top.yokey.shopnc.base.BaseConstant;

@SuppressWarnings("ALL")
public class SellerOrderModel {

    private final String ACT = "seller_order";
    private static volatile SellerOrderModel instance;

    public static SellerOrderModel get() {
        if (instance == null) {
            synchronized (SellerOrderModel.class) {
                if (instance == null) {
                    instance = new SellerOrderModel();
                }
            }
        }
        return instance;
    }

    public void orderSpayPrice(String orderId, String orderFee, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "order_spay_price")
                .add("order_id", orderId)
                .add("order_fee", orderFee)
                .post(baseHttpListener);

    }

    public void orderList(String stateType, String orderKey, String page, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "order_list")
                .add("state_type", stateType)
                .add("order_key", orderKey)
                .add("page", BaseConstant.PAGE)
                .add("curpage", page)
                .post(baseHttpListener);

    }

}
